package uk.ac.ebi.bioinvindex.model.impl;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.search.annotations.DocumentId;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;

/**
 * User: Nataliya Sklyar (nsklyar@ebi.ac.uk)
 * Date: Jul 10, 2007
 */

@MappedSuperclass
public abstract class IdentifiableImpl{

	private Long id;

	protected IdentifiableImpl() {
	}

	@Id
	@GeneratedValue(strategy= GenerationType.TABLE)
	@GenericGenerator(name = "hibseq", strategy = "seqhilo")
	@DocumentId
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Override
	public String toString() {
		return "IdentifiableImpl{" +
				"id=" + id +
				'}';
	}


}
